﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MengXunAppTool.Helper
{
    public class Sql5Helper
    {
        private ConnectionConfig connection = null;
        public SqlSugarClient db = null;
        public Sql5Helper()
        {
            //string SqlIP = "192.168.5.206";
            string SqlIP = "192.168.2.5";
            string database = "EdgeDB";
            string uid = "sa";
            string pwd = "8ik,9ol.";
            connection = new ConnectionConfig()
            {
                ConnectionString = "server='" + SqlIP + "';initial catalog='" + database + "';uid='" + uid + "';pwd='" + pwd + "'",
                DbType = DbType.SqlServer,
                IsAutoCloseConnection = true,
                InitKeyType = InitKeyType.Attribute
            };
            db = new SqlSugarClient(connection);
        }
        [SugarTable("sys_user")]
        public class sys_user
        {
            /// <summary>
            /// 工号
            /// </summary>
            public string user_name { get; set; }
            /// <summary>
            /// 姓名
            /// </summary>
            public string nick_name { get; set; }
            public DateTime update_time { get; set; }
            public string email { get; set; }
        }
    }
}
